package com.gjy.service;

import com.gjy.dao.AdminMapper;
import com.gjy.domain.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {

    @Autowired
    AdminMapper adminMapper;

    public void add(Admin admin){
        adminMapper.insertSelective(admin);
    }

    public List<Admin> findAll(){
        return adminMapper.selectByExample(null);
    }
}
